#include <cppunit/plugin/PlugInManager.h>
#include <cppunit/TestResult.h>
#include <cppunit/TestResultCollector.h>
#include <cppunit/TestRunner.h>
#include <cppunit/TestFailure.h>

class MyListener;
class CppUnitTestRunner
{
public:
	CppUnitTestRunner();
	~CppUnitTestRunner();
	void LoadTests(const char* p_pszPluginPath);
	void UnloadTests(const char* p_pszPluginPath);
	bool RunTest(const char* p_pszTestPath);
	CPPUNIT_NS::Test* GetTestRoot();

private:
	CPPUNIT_NS::PlugInManager* m_pPlugInManager;
	CPPUNIT_NS::TestResult* m_pController;
	CPPUNIT_NS::TestResultCollector* m_pResultCollector;
	MyListener* m_pMyListener;
	CPPUNIT_NS::TestRunner* m_pTestRunner;
	CPPUNIT_NS::Test* m_pTests;
	CPPUNIT_NS::TestFailure* m_pFailure;
};

